package com.project.controller;

import com.project.bean.CutPageBean;
import com.project.bean.GoodsBean;
import com.project.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("goods")
public class GoodsController {
    @Autowired
    private IGoodsService service;
    @RequestMapping("findByItem")
    public CutPageBean<GoodsBean> findByItem(int pageNo,String name){
        return service.findByItem(pageNo,name);
    }
    @RequestMapping("findById")
    public GoodsBean findById(int id){
        return service.findById(id);
    }
}
